﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Threading;
using WeiTap.Validator.Result;

namespace WeiTap.Validator.PropertyValidators
{
    public interface IPropertyValidator
    {
        bool IsAsync { get; set; }
        IEnumerable<ValidationFailure> Validate(PropertyValidationContext context);
        IEnumerable<ValidationFailure> ValidateAsync(PropertyValidationContext context, CancellationToken cancel);
        /// <summary>
        /// Arg1,待验证实力
        /// Arg2，属性值
        /// </summary>
        ICollection<Func<object, object, object>> CustomMessageFormatArguments { get; }

        Func<object, object> CustomStateProvider { get; set; }

        Severity Severity { get; set; }


    }
}